package com.chenfan.mcn.model.vo;

import com.chenfan.mcn.enums.BusinessCommissionEnum;
import com.chenfan.mcn.model.BusinessCommission;
import com.chenfan.mcn.model.common.PageInfo;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Objects;

/**
 * @Author liuyang
 * @Date 2021/8/31
 * @Time 10:41
 * @Version V1.0
 **/
@EqualsAndHashCode(callSuper = true)
@Data
public class BusinessConfirmationDetails extends BusinessCommission {

    /**
     * 确认详情
     */
    private PageInfo<BusinessCommissionConfirmVO> confirmList;

    /**
     * 提成单状态名称(1-新建，2-已发送，3-已确认，4-已发放, 9-已作废)
     */
    private String businessStatusName;


    public String getBusinessStatusName() {
        if (Objects.nonNull(getBusinessStatus())) {
            return BusinessCommissionEnum.getStatusName(getBusinessStatus());
        }
        return null;
    }
}
